#include <iostream>
#include <fstream>
#include <cassert>
#include <string>
#include "boost/timer.hpp"
#include "boost/progress.hpp"
#include <unistd.h>
#include <vector>

using namespace boost;
using namespace std;

int main(int argc, char** argv) {
	vector<string> v(100);
	
	if (argc < 2 || argv[1] == NULL) {
		printf("user#./progress_display [file]\n"); 
		return -1;
	}

	ifstream fs("/tmp/adb.log");
	string data;

	if (fs) {
		progress_display pd(v.size());

		vector<string>::iterator pos;
		int i = 0;
		for(pos = v.begin(); pos != v.end(); ++pos, ++i) {
			fs >> data;
			cout << data << endl;
			++pd;
		}
	}else{
		cout<< "Can not open file"<< endl;
	}
	return 0;
}
